<?php $this->headLink()->appendStylesheet($this->baseUrl().'/css/master.css'); echo $this->headLink(); ?>
<div id="menu">
<div id="menu_items">
<?php 
foreach($this->layout()->result2 as $groupId=>$groupName)
{
	foreach($groupName as $gName=>$gCategories)
	{
		echo '<a href="'.$this->url(
							array('controller'=>'category', 
								'action'=>'listproducts',
								'type'=>'category',
								'value'=>$groupId),NULL,TRUE).'">'.$gName.'</a>';	
	}
	
}?>
</div>
<div id="search_form">
	<?php
	$base_url = $this->baseUrl();
	
	/*
	 * Not using Zend form for the search since it's just
	 * one box and Zend adds too many unnecessary dl elements
	 
		$form = new Zend_Form();
		$form->setAction($base_url."/category/listproducts");
		$form->setMethod("get");
		//create text input
		$searchField = new Zend_Form_Element_Text('value');
		$searchTypeField = new Zend_Form_Element_Hidden('type');
		$searchField->setAllowEmpty(false);
		$searchTypeField->setOptions(array(
										'value'=>'search',
										'id' => 'search_type'
											));
		$form->addElements(array($searchField,$searchTypeField));
		$form->setOptions(array('class'=>'Bert'));
	*/
	$form = "<form id='search_form' method='get' action='".$base_url."/category/listproducts'>".
			"<input type='text' name='value' value='search'>
			<input type='hidden' name='type' value='search'>
			</form>";	
		echo $form; 
	?>
</div>
</div>
<?php echo $this->layout()->content; ?>
<div id="footer">
<p>This is the footer</p>
</div>
